

package tomkitty;

import java.net.*;
import java.util.*;

public class TkRequest implements Request {

  protected Socket sock = null;
  protected String method = null;
  protected int major;
  protected int minor;
  protected URI uri = null;
  protected URI origUri = null;
  protected Hashtable<String, String> fields = new Hashtable<String, String>();
  protected boolean valid = false;

  public Socket getSocket() { return sock; }
  public void setSocket(Socket sock) { this.sock = sock; }

  public String getMethod() { return method; }
  public void setMethod(String method) { this.method = method; }

  public int getVersionMajor() { return major; }
  public void setVersionMajor(int major) { this.major = major; }

  public int getVersionMinor() { return minor; }
  public void setVersionMinor(int minor) { this.minor = minor; }

  public URI getUri() { return uri; }
  public void setUri(URI uri) { this.uri = uri; }

  public URI getOrigUri() { return origUri; }
  public void setOrigUri(URI uri) { this.origUri = uri; }

  public String getField(String key) { return fields.get(key); }
  public void setField(String key, String value) { fields.put(key, value); }

  public boolean isValid() { return valid; }
  public void isValid(boolean valid) { this.valid = valid; }

}
